Skip to main content

DescribeMetricRuleCount

Description

call the DescribeMetricRuleCount interface to obtain the number of various state alarm rules.

Request Method

POST

Request Path

/apsara/route/cms/DescribeMetricRuleCount

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
MetricNameBODYstringNocpu_totalmonitoring item name to query .
regionIdBODYstringYesNo sample value for this parameter.region id
versionBODYstringNo2016-01-01version of api
NamespaceBODYstringNoacs_ecs_dashboardthe data namespace of the product can be obtained by querying the DescribeMetricMetaList interface .

Return data

NameTypeSample valueDescription
MetricRuleCountnoneNonestatistics on the number of alarm rules in various states.
MessagestringThe Request is not authorization.error message.
RequestIdstringFF38D33A-67C1-40EB-AB65-FAEE51EDB644request ID, used to troubleshoot problems.
Alarminteger5number of rules for alarm status.
Totalinteger45the total number of alarm rules.
OKinteger40the number of rules in the normal state.
Codestring200status code, 200 indicates success.
Disableinteger0the number of disabled.
Nodatainteger0number of rules without data.
Successbooleantruewhether it was successful.

Example

Successful Response example

{
"MetricRuleCount":"None",
"Message":"The Request is not authorization.",
"RequestId":"FF38D33A-67C1-40EB-AB65-FAEE51EDB644",
"Alarm":"5",
"Total":"45",
"OK":"40",
"Code":"200",
"Disable":"0",
"Nodata":"0",
"Success":"true"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}